<template>
    <view class="richtext">
        <piaoyiEditor :values="valueData" :maxlength="3000" @changes="saveContens" :readOnly="readOnly"
            :photoUrl="photoUrl" :api="api" :name="name" />
    </view>
</template>

<script setup>
import piaoyiEditor from '@/uni_modules/piaoyi-editor/components/piaoyi-editor/piaoyi-editor.vue';
import { ref } from 'vue';

const props = defineProps({
    valueData: {
        default: '',
        type: String
    }
})

const readOnly = ref(false)
const photoUrl = ref('https://qunyin.hihink.com')
const api = ref('/prod-api/common/upload')
const name = ref('file')
const values = ref('')
// if (props.valueData) {
// console.log(props.valueData, 'props.valueData')
// values.value = props.valueData
// }
const emit = defineEmits(['edit'])
const saveContens = (data) => {
    emit('edit', data.html)
}
</script>

<style lang="scss"></style>